<?php
/**
 *      [迷你云] (C)2009-2012 南京恒为网络科技.
 *   软件仅供研究与学习使用，如需商用，请访问www.miniyun.cn获得授权
 * 
 */
?>
<?php

class SystemManager
{
    
    public static function addUserSuccess ()
    {
        $path = dirname(__FILE__) . '/../config/system-config.php';
        $content = file_get_contents($path);
        $content = str_replace("init", "done", $content);
        file_put_contents($path, $content);
    }
    
    public static function delUserSuccess ()
    {
        $count = User::model()->count();
        if ($count != 1) {
            return;
        } elseif ($count == 1) {
            $path = dirname(__FILE__) . '/../config/system-config.php';
            $content = file_get_contents($path);
            $content = str_replace("done", "init", $content);
            file_put_contents($path, $content);
        }
    }
}